package com.aerotechnic.service.implementation;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.aerotechnic.dao.implementation.PhaseDao;
import com.aerotechnic.entities.Jalon;
import com.aerotechnic.entities.Phase;
import com.aerotechnic.service.interfaces.PhaseBoIn;


@Service("PhaseBo")
@Transactional
public class PhaseBo implements PhaseBoIn {
	@Autowired
	PhaseDao phaseDao;

	@Override
	public void save(Phase myEntity) {
		// TODO Auto-generated method stub
		phaseDao.save(myEntity);
		
	}

	@Override
	public void update(Phase myEntity) {
		// TODO Auto-generated method stub
		phaseDao.update(myEntity);
	}

	@Override
	public void delete(Long id) {
		// TODO Auto-generated method stub
		phaseDao.delete(id);
	}

	@Override
	public Phase findByID(Long id) {
		// TODO Auto-generated method stub
		return phaseDao.findByID(id);
	}

	@Override
	public List<Phase> findAll() {
		// TODO Auto-generated method stub
		return phaseDao.findAll();
	}
	
	@Override
	public List<Phase> find(int jtStartIndex, int jtPageSize) {
		// TODO Auto-generated method stub
		return phaseDao.find(jtStartIndex, jtPageSize);
	}

	@Override
	public int countAllPhase() {
		// TODO Auto-generated method stub
		return phaseDao.countAllPhase();
	}

	@Override
	public Phase getPhaseByCode(int phaseCode) {
		// TODO Auto-generated method stub
		return phaseDao.getPhaseByCode(phaseCode);
	}

}
